package com.zzy.service.impl;

import com.zzy.dao.UserDao;
import com.zzy.pojo.User;
import com.zzy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;


    @Override
    public List<User> queryAll() {
        System.out.println("======================service业务层，显示所有用户======================");
        return userDao.queryAll();
    }

    @Override
    public User queryById(int id) {
        return null;
    }

    @Override
    public void addUser(User user) {
        System.out.println("====================service业务层，保存用户========================");
        userDao.addUser(user);
    }

    @Override
    public int deleteUserById(int id) {
        return 0;
    }

    @Override
    public int updateUser(User user) {
        return 0;
    }

}
